-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Fix mysql return bug #4450
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix mysql return bug #4450
Conversation
|
Hi @gengjun-git , you can write "Fix #4449", so that the related issue will be closed automatically when this PR is merged. |
| if (!isOutfileQuery) { | ||
| sendFields(queryStmt.getColLabels(), queryStmt.getResultExprs()); | ||
| } | ||
| boolean isSendFields = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the reason is that the fields has been sent but no data is sent following?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, fields has been sent, but query may fail because of timeout. In this case, client will get a fields packet, and error packet, but some language mysql driver cannot recognize the error, and returns a success and no rows result.
morningman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fix #4449
Send fields after first row arrived so that error packet can be send to client when exception thrown from coord.getNext(). Golang and Python can not identify error if fields packet arrived before error packet.